/*
 * Copyright 2010 J Patrick Davenport
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package v4view.web;

public class Body extends ChildbearingPageElement implements ICoreAttributes, ILanguageAttributes<Body>, ILoadEvents<Body> {
	private static final String	BODY	= "body";

	{
		this.setTag(BODY);
		this.setSupportsAttributes(true);
	}

	@Override
	public Body setDir(final String _value) {
		this.setAttribute(DIR_KEY, _value);
		return this;
	}

	@Override
	public Body setLang(final String _lang) {
		this.setAttribute(LANG_KEY, _lang);
		return this;
	}

	@Override
	public Body setXmlLang(final String _xmlLang) {
		this.setAttribute(XML_LANG_KEY, _xmlLang);
		return this;
	}

	@Override
	public String getDir() {
		return this.getAttributeValue(DIR_KEY);
	}

	@Override
	public String getLang() {
		return this.getAttributeValue(LANG_KEY);
	}

	@Override
	public String getXmlLang() {
		return this.getAttributeValue(XML_LANG_KEY);
	}

	@Override
	public String getCssClass() {
		return this.getAttributeValue(CSS_CLASS_KEY);
	}

	@Override
	public String getId() {
		return this.getAttributeValue(ID_KEY);
	}

	@Override
	public String getStyle() {
		return this.getAttributeValue(STYLE_KEY);
	}

	@Override
	public String getTitle() {
		return this.getAttributeValue(TITLE_KEY);
	}

	@Override
	public Body setCssClass(final String _value) {
		this.setAttribute(CSS_CLASS_KEY, _value);
		return this;
	}

	@Override
	public Body setId(final String _value) {
		this.setAttribute(ID_KEY, _value);
		return this;
	}

	@Override
	public Body setStyle(final String _value) {
		this.setAttribute(STYLE_KEY, _value);
		return this;
	}

	@Override
	public Body setTitle(final String _value) {
		this.setAttribute(TITLE_KEY, _value);
		return this;
	}

	@Override
	public Body setOnLoad(final String _scriptlet) {
		this.setAttribute(ON_LOAD_EVENT_KEY, _scriptlet);
		return this;
	}

	@Override
	public Body setOnUnload(final String _scriptlet) {
		this.setAttribute(ON_UNLOAD_EVENT_KEY, _scriptlet);
		return this;
	}

	@Override
	public String getOnLoad() {
		return this.getAttributeValue(ON_LOAD_EVENT_KEY);
	}

	@Override
	public String getOnUnload() {
		return this.getAttributeValue(ON_UNLOAD_EVENT_KEY);
	}

}
